Skip to content

Rewrite 2 - #3811

Merged
galabovaa merged 1 commit into
cupdlp-csparsefrom
cupdlp-csparse-rewrite-2
Nov 26, 2026
Merged

galabovaa merged 1 commit into
cupdlp-csparsefrom
cupdlp-csparse-rewrite-2

Conversation

@galabovaa

@galabovaa galabovaa commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Rewrites ipx::DepthFirstSearch, ipx::AugmentingPath and BASICLU's lu_dfs
from the published algorithms, so IPX and BASICLU no longer follow CSparse's
cs_dfs.c / cs_augment.c. Signatures and callers are unchanged. The
CSparse citations are replaced with references to Tarjan (1972),
Gilbert & Peierls (1988) and Duff (1981).

  • DepthFirstSearch / lu_dfs: iterative DFS. Finished nodes are written
    downward from top, giving a topological order. lu_dfs now has one loop
    in place of the separate dfs / dfs_end functions.
  • AugmentingPath: DFS for an alternating path, with Duff's cheap
    assignment check. Over all calls, the cheap checks cost O(nnz).

Testing

  • New check/TestSparseGraphUtils.cpp ([highs_sparse_graph]): tests each
    routine against its contract on random graphs, using independent
    reference computations. All pass.
  • Compared with the original code on 30,000 random matrices
    (ASan/UBSan on): outputs identical on every call.
  • IPX with crossover: identical logs on 93/94 check/instances; the
    exception, issue-3166, hits the time limit with both versions.

Checklist

  • I have read the contributing guidelines
  • This PR targets the latest branch
  • Tests are passing
  • Documentation was updated where relevant
  • This PR is not primarily AI-generated (per the AI contributions policy in CONTRIBUTING.md)

@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.64029% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.18%. Comparing base (bb0e6f5) to head (d2696f1).
⚠️ Report is 3 commits behind head on cupdlp-csparse.

Files with missing lines Patch % Lines
check/TestSparseGraphUtils.cpp 99.45% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           cupdlp-csparse    #3811      +/-   ##
==================================================
+ Coverage           76.15%   76.18%   +0.02%     
==================================================
  Files                 467      468       +1     
  Lines              116789   116881      +92     
  Branches            18144    18191      +47     
==================================================
+ Hits                88946    89048     +102     
+ Misses              27603    27593      -10     
  Partials              240      240              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@galabovaa
galabovaa force-pushed the cupdlp-csparse-rewrite-2 branch from c28b14f to d2696f1 Compare November 26, 2026 15:24
@galabovaa
galabovaa merged commit e42cb2e into cupdlp-csparse Nov 26, 2026
565 checks passed
@galabovaa
galabovaa deleted the cupdlp-csparse-rewrite-2 branch November 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant